﻿namespace OpenAdmin.Application.Services;

/// <summary>
/// 获取角色
/// </summary>
public interface IRoleService
{
    /// <summary>
    /// 获取角色列表
    /// </summary>
    /// <returns></returns>
    Task<List<RoleResponseDto>> GetRoles(string keyworld = default);

    /// <summary>
    /// 分页获取角色列表
    /// </summary>
    /// <param name="requestDto"></param>
    /// <returns></returns>
    Task<PagedList<RolesByPageResponseDto>> GetRolesByPage(RolesByPageRequestDto requestDto);

    /// <summary>
    /// 根据用户获取角色列表
    /// </summary>
    /// <param name="userId"></param>
    /// <returns></returns>
    Task<List<RoleResponseDto>> GetRolesByUserId(int[] userId);

    /// <summary>
    /// 添加角色
    /// </summary>
    /// <param name="requestDto"></param>
    /// <returns></returns>
    Task AddRole(AddRoleRequestDto requestDto);

    /// <summary>
    /// 更新角色信息
    /// </summary>
    /// <param name="requestDto"></param>
    Task EditRole(EditRoleRequestDto requestDto);

    /// <summary>
    /// 删除角色
    /// </summary>
    /// <param name="id"></param>
    Task DeleteRole(int id);
}
